//
//  NSObject+Swizzling.h
//  ReviewDemo
//
//  Created by 龙 on 2018/3/14.
//  Copyright © 2018年 long. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (Swizzling)

+ (void)methodSwizzlingWithOriginalSelector:(SEL)originalSelector
                         bySwizzledSelector:(SEL)swizzledSelector;

@end

/*
 通过Method Swizzling可以把事件代码或Logging，Authentication，Caching等跟主要业务逻辑代码解耦，这种处理方式叫做Cross Cutting Concerns https://en.wikipedia.org/wiki/Cross-cutting_concern
 
 用Method Swizzling动态给指定的方法添加代码解决Cross Cutting Concerns的编程方式叫Aspect Oriented Programming 面向方面的编程（AOP)  https://en.wikipedia.org/wiki/Aspect-oriented_programming
 
 */
